-- GENERATED SPELL FOR [Mai'Zoth] --


function spell0_818(pUnit, Event) --@Flame Spike,n/a--
pUnit:FullCastSpellOnTarget(8814,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_818', 12000, 1)
end

function spell1_818(pUnit, Event) --@Frost Armor,Self--
pUnit:FullCastSpellOnTarget(12544,pUnit)
pUnit:RegisterEvent('Sorts_818', 0, 1)
end

function spell2_818(pUnit, Event) --@Frostbolt Volley,n/a--
pUnit:FullCastSpellOnTarget(8398,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_818', 10000, 1)
end

function Sorts_818(pUnit, Event)
local choix_sorts_818 = math.random(0, 2)
if choix_sorts_818 == 0 then
pUnit:RegisterEvent('spell0_818', 1, 1)
end
if choix_sorts_818 == 1 then
pUnit:RegisterEvent('spell1_818', 1, 1)
end
if choix_sorts_818 == 2 then
pUnit:RegisterEvent('spell2_818', 1, 1)
end
end

function mob818_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_818', math.random(1500, 3000), 1)
end

function mob818_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob818_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob818_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(818, 1, 'mob818_Action')
RegisterUnitEvent(818, 2, 'mob818_Leave')
RegisterUnitEvent(818, 3, 'mob818_Kill')
RegisterUnitEvent(818, 4, 'mob818_Die')
